cmake_minimum_required(VERSION 3.10.2)
project(find_package_test)

#[[
这是一个多行注释
这是第二行
这是第三行
这是最后一行
]]

#find_package(mymath 1.1.3.2...1.2.4.0
#find_package(mymath 
#    CONFIG
#    REQUIRED
#    COMPONENTS test 
#    PATHS ./mymath/mymath
#)

# module mode
#find_package(LibLZMA MODULE)

# config mode
find_package(lzma CONFIG
    NAMES lzma
    PATHS ./)
#if (lzma_FOUND)
#    message("Find lzma library: ${lzma_INCLUDE_DIR}, ${lzma_LIBRARY}")
#    include_directories(${lzma_INCLUDE_DIR})
#    add_executable(test test.cpp)
#    target_link_libraries(test ${lzma_LIBRARY})
#endif()

#find_package(LibLZMA)
#if (LibLZMA_FOUND)
#    message("Find lzma: ${lzma_INCLUDE_DIR}, ${lzma_LIBRARY}")
#endif()

find_package(mymath CONFIG 
    COMPONENTS test
    PATHS ./mymath/mymath)
if(mymath_FOUND)
    message("Find mymath: ${mymath_INCLUDE_DIR}; ${mymath_LIBRARY}; ${mymath_test}")
    add_executable(test test.cpp)
    include_directories(${mymath_INCLUDE_DIR})
    target_link_libraries(test ${mymath_LIBRARY})
endif()

set(nf NF_NOTFOUND)
#$<BOOL:${nf}>
message("PRINT: ${nf}")
message("PINRT GE: " $<BOOL:${nf}>)



